# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Sébastien Luttringer
# Contributor: Jaroslaw Swierczynski <swiergot@juvepoland.com>

pkgname=shfs-utils
pkgver=0.35
pkgrel=7
pkgdesc='SHell FileSystem Linux utils'
url='http://shfs.sourceforge.net/'
license=('GPL')
arch=('loong64' 'x86_64')
depends=('glibc' 'openssh')
makedepends=('patch')
source=("https://downloads.sourceforge.net/sourceforge/shfs/shfs-$pkgver.tar.gz"
        'shfs-utils-make.patch')
md5sums=('016f49d71bc32eee2b5d11fc1600cfbe'
         '49fb94b139bc69927815127f0bf85159')

prepare() {
  patch -Np0 -d shfs-$pkgver < $pkgname-make.patch
}

build() {
  cd shfs-$pkgver
  make -j1 utils
}

package() {
  cd shfs-$pkgver
  make -j1 ROOT="$pkgdir" utils-install
  # remove sbin symlinks
  rm -r "$pkgdir/sbin"
}
